

WiFi setup for MB03+
~~~~~~~~~~~~~~~~~~~~


Author: Hood
Acknowledgements: Lanex, LMN, Busy, Shrek, Peg7g, Nihirash, and others from Slack discussion.
version 1.0

It is distributed in two versions. One as a binary and the second as a standalone. The binary one is to be flashed with Reflasher utility, under letter F. Once flashed, press "W" to run the application In MB03+ boot menu after reset. The standalone one works isolated in BS-DOS as well as in Esxdos. Both versions behave same way and have same functionality.




General
~~~~~~~
WiFi setup for MB03+ (further reffered to as "WSetup") does the same job as Wifi configurations utilities on PC or mobile devices- it connects your WiFi module to the internet. It is distributed in two forms.

Its main purpose is to serve to the user as a tool to setup essential functions of their WiFi module. Thus WSetup can be used as a base for user's own WiFi programs and utilities. WSetup 1.0 is self sufficient and should not need outer interventions for its work (like typing AT commands from a terminal, typing OUTs from BASIC, etc.). WSetup uses the latest WifiBios ver. 1.8.


Functions/ features
~~~~~~~~~~~~~~~~~~~
- displays information/ screen organisation
- constant monitoring of WiFi state
- speed management 1.0
- set time& date
- run terminal
- leave WiFi module ON/OFF on exit
- connect to selected AP (Access Point)
- disconnect from AP
- constant monitoring of signal strength
- reset WiFi module




I tried to write the WSetup as user friendly as possible but for sure, let's have a closer look at individual features.

Display information/ screen organisation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Upon start, WSetup always turns WiFi module on. Then speed management is called, set speed is displayed on a second line (always maximum UART speed given for your MB03+ firmware, so with the latest one you get speed 16= 3456000 Bd at the moment). After set speed comes "MBFW=" followed by a number. The number indicates number of UART speeds allowed by your MB03+ firmware. First line is also showing a connection status and will tell you detailed description of connection. Third line shows AP, to which you are currently connected to plus its signal strength. Line 4 shows default AP, line 5 shows Auto AP, it means if module should automatically connect to default AP or not after it's power up. Line 6 is showing default speed set in WiFi module.

Blank area beneath displays list of AP in your surroundings if chosen. Then list of program functions follows. Bottom two lines serve as a communication interface. Here display of reports or user data input take place. In the lower right corner a blue square appears if the program waits for the module.



Constant monitoring of WiFi state
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This feature gives the user constant overview about the state of his WiFi module, so that the user knows if any action is neccesary. Line 1 and 3 are being under constant monitoring.



Speed management 1.0
~~~~~~~~~~~~~~~~~~~~
One of the trickiest parts to sort out. It goes as low as to MB03+ firmware detection up to WiFi speed detection. This part ensures that communication between internal UART and WiFi module is aligned. No matter what state module and UART were in, Speed management 1.0 should be able to always align them in the same speed and thus ensure communication with AT commands can take place. Version 1.0 sets automatically maximum speed for given MB03+ firmware. The best one is 3456000 Bd. Other speeds do not work as yet. In future versions of Speed management, I plan to add possibility to set all speeds which MB03+ UART offers.


Set time& date
~~~~~~~~~~~~~~
Press S to set time& date on your MB03+. Both are then set sharp precisely from available internet servers. Important notice: you may influence the time by setting appropriate time zone in MB03+ setup. This way you may also influence winter and summer times (by adding or substracting +1 to our time zone). I think about how winter/summer time could be set automatically, but at the moment have no idea.


Run terminal
~~~~~~~~~~~~
Press T to run terminal. It was written by ZX Next authors (eg. Victor Trucco, Bill Gilberts..) and slightly adapted for MB03+ by LMN and me. The terminal is very handy if you need to work with WiFi module in detail. Speed 115200 Bd is set upon terminal start. Quit it with SS+ SPACE.



Leave WiFi module ON/OFF on exit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Press W to toggle ON/OFF. WSetup will leave Wifi module on/off according to this toggle.



Connect to selected AP (Access Point)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Press A to connect you to Access Point in your surroundings. A list of found APs is displayed, starting with ones with strongest signal. You may browse among them with up/ down arrows, edit key will cancel selection, Enter key proceeds to selected AP login as default AP. SS+ Enter proceeds to select AP login as current AP. Press TRUE VIDEO to exit from password input. If login was successful, then selected AP will become default or current AP. If you are already connected to an AP and you want to change the AP, you do not have to disconnect from the old one. Just select the new one and log in to it. Default AP is the one that WiFi module connects to after its power up (supposing aotoconnection is set to ON). Proper AP connection is a gateway to the absolute world of internet:-)



Disconnect from AP
~~~~~~~~~~~~~~~~~~
Press D to disconnect from AP. From some reasons you may want to disconnect from AP.


Reset WiFi module
~~~~~~~~~~~~~~~~~
Press R to reset WiFi module. It can happen, that you got stuck. Eg. you are unable to connect to AP even though your password is correct. Then WiFi module reset could help.



Overall functionality of WSetup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...depends quite a lot on the firmware that your module holds. I recommend to use the latest one. WSetup was tested with FW AT version: 1.7.4.0 from May 11, 2020. SDK version is 3.0.4(9532ceb). You find out your FW version if you switch to terminal and type command "AT+GMR". If you have older version, try updating your FW with AT command "AT+CIUPDATE". If this command returns "ERROR" your FW is too old and does not know update over internet. So you have to upgrade (flash) FW in your module with a special hardware.


Bugs in version 1.0
~~~~~~~~~~~~~~~~~~~~
Some errors occur from time to time, and I plan to fix them. You may report them to me, either on Slack, or ony Telegram, WhatsApp, Facebook. Or mstava01(at)gmail.com.



to-do list
~~~~~~~~~~
- Speed management- to work with user defined speed- priority
- show IP address ??
- ping ??
- module name change
- auto AP change
- display module FW version ??

It all depends on my time and free memory. Total WSetup length mustnot exceed 16384 bytes in order to hold in one 16 kb page.

